package com.gshg.log.cleanlog.quartz.demo;

import org.quartz.JobDataMap;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;

public class JobDetailDemo1 extends QuartzJobBean {

    @Autowired
    private DemoSerice demoSerice;
    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        JobDataMap jdm = jobExecutionContext.getMergedJobDataMap();//获取初始参数
        String jobId = jobExecutionContext.getFireInstanceId();

//        jobExecutionContext.get

        demoSerice.testDemo("demoJob1["+jobId+"]", System.currentTimeMillis());

    }
}
